OsreeFetcher: Treat 403 as not found
authorSjoerd Simons <sjoerd@luon.net>
Mon, 17 Oct 2016 20:30:41 +0000 (22:30 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sat, 5 Nov 2016 17:34:09 +0000 (17:34 +0000)
Private Cloudfront instances return 403 for objects which don't exist
rather then a 404.

Change the fetcher to assume 403 is ok for download that are "optional"
rather then erroring out at that step (e.g. trying to download a static
delta if the remote repo doesn't have those)

Closes: #531
Approved by: cgwalters

src/libostree/ostree-fetcher.c

index a4d460166814b5bfd219b82061a5ad1411064a16..18794ce1916542cf78a323f16a0268bfbe5e5555 100644 (file)
@@ -1057,6 +1057,7 @@ on_request_sent (GObject        *object,
               switch (msg->status_code)
                 {
                 case 404:
+                case 403:
                 case 410:
                   code = G_IO_ERROR_NOT_FOUND;
                   break;